Platform Explorer / Nuxeo Platform 2021.47

Component org.nuxeo.ecm.core.versioning.default-policies

Requirements

Resolution Order

142
The resolution order represents the order in which this component has been resolved by the Nuxeo Runtime framework.
You can influence this order by adding "require" tags in your component declaration, to make sure it is resolved after another component.

Contributions

XML Source

<?xml version="1.0"?>
<component name="org.nuxeo.ecm.core.versioning.default-policies" version="1.0">

  <require>org.nuxeo.ecm.platform.el.service</require>

  <extension target="org.nuxeo.ecm.core.api.versioning.VersioningService" point="policies">
    <policy id="no-versioning-for-system-before-update" beforeUpdate="true" increment="NONE" order="1">
      <filter-id>system-document</filter-id>
    </policy>
    <policy id="no-versioning-for-system-after-update" increment="NONE" order="1">
      <filter-id>system-document</filter-id>
    </policy>
    <policy id="disable-versioning-before-update" beforeUpdate="true" increment="NONE" order="2">
      <filter-id>disable-versioning</filter-id>
    </policy>
    <policy id="disable-versioning-after-update" increment="NONE" order="2">
      <filter-id>disable-versioning</filter-id>
    </policy>
    <policy id="note-as-wiki" increment="MINOR" order="50">
      <filter-id>note-filter</filter-id>
    </policy>
    <policy id="collaborative-save" increment="MINOR" beforeUpdate="true" order="100">
      <filter-id>last-contributor-different-filter</filter-id>
    </policy>
  </extension>

  <extension target="org.nuxeo.ecm.core.api.versioning.VersioningService" point="filters">
    <filter id="system-document" class="org.nuxeo.ecm.core.versioning.NoVersioningPolicyFilter" />
    <filter id="disable-versioning">
      <condition>#{currentDocument.contextData.DisableAutomaticVersioning}</condition>
    </filter>
    <filter id="note-filter">
      <type>Note</type>
    </filter>
    <filter id="last-contributor-different-filter">
      <schema>file</schema>
      <condition>#{previousDocument.dc.lastContributor != currentDocument.dc.lastContributor}</condition>
    </filter>
  </extension>

</component>